<?php

namespace Admin\Controller;
use User\Api\UserApi;

class PreorderController extends AdminController {
    public function index(){
        $map['status']  =   array('egt',0);

        $list = $this->lists('Preorder', $map);
        int_to_string($list);
        $this->assign('_list', $list);
        $this->meta_title = '预订列表';
        $this->display();
    }
    public function process($method=null){
        $id = array_unique((array)I('id',0));
        $id = is_array($id) ? implode(',',$id) : $id;
        if ( empty($id) ) {
            $this->error('请选择要操作的数据!');
        }
        $map['pid'] =   array('in',$id);
        switch ( strtolower($method) ){
            case 'del':
                $this->delete('Preorder', $map );
                break;
            default:
                $this->error('参数非法');
        }
    }
}